package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 签证申请对象 sys_visa_application
 *
 * @author mars
 * @date 2024-03-14
 */

@Data
@ApiModel(value = "签证申请对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_visa_application")
public class SysVisaApplication {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 申请人ID
     */
    @Excel(name = "申请人ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "申请人ID")
    private Long userId;
    /**
     * 滞留期间
     */
    @Excel(name = "滞留期间")
    @ApiModelProperty(value = "滞留期间")
    private String stayType;
    /**
     * 护照号码
     */
    @Excel(name = "护照号码")
    @ApiModelProperty(value = "护照号码")
    private String passportNo;
    /**
     * 电话
     */
    @Excel(name = "电话")
    @ApiModelProperty(value = "电话")
    private String telephone;
    /**
     * 访问国家
     */
    @Excel(name = "访问国家")
    @ApiModelProperty(value = "访问国家")
    private String country;
    /**
     * 访问原因
     */
    @Excel(name = "访问原因")
    @ApiModelProperty(value = "访问原因")
    private String reason;
    /**
     * 审核状态
     */
    @Excel(name = "审核状态")
    @ApiModelProperty(value = "审核状态")
    private String status;

    @TableField(exist = false)
    @ApiModelProperty(value = "申请人")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty(value = "状态名称")
    private String statusName;

    @TableField(exist = false)
    @ApiModelProperty(value = "滞留期间名称")
    private String stayTypeName;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "时间（年月）")
    private String createTimeDate;
}
